<jsp:directive.include file="/jsp/includes/taglibs.jsp" />

<spring:hasBindErrors name="accountSearchCommand">
	<ul>
		<c:forEach items="${errors.allErrors}" var="error">  
			<li><spring:message code="${error.code}"/></li>  
		</c:forEach>
	</ul>  
</spring:hasBindErrors>

<table id="searchResultsTable" class="dataTable" width="100%">
	<thead>
		<tr>
			<th class="left" nowrap="nowrap"><spring:message code="search.account.results.name"/></th>
			<th nowrap="nowrap"><spring:message code="search.account.results.email"/></th>
			<th nowrap="nowrap"><spring:message code="search.account.results.title"/></th>
			<th nowrap="nowrap"><spring:message code="search.account.results.sourceDate"/></th>
			<th nowrap="nowrap"><spring:message code="search.account.results.lastLogin"/></th>
			<th nowrap="nowrap"><spring:message code="search.account.results.enabled"/></th>
			<th nowrap="nowrap"><spring:message code="search.account.results.locked"/></th>
		</tr>	
	</thead>

<c:forEach items="${ accounts }" var="account"> 
	<tr>
		<td class="left">
			<a href="<c:url value="/admin/account/edit?id=${ account.id }"/>">
			${ account.name }</a>
		</td>
		<td>${ account.email }</td>
		<td nowrap="nowrap">${ account.title }</td>
		<td nowrap="nowrap"><fmt:formatDate value="${account.sourceDate}"/></td>
		<td nowrap="nowrap"><fmt:formatDate value="${account.lastLogin}"/></td>
		<td>
			<c:if test="${!account.enabled }">
				x
			</c:if>
		</td>
		<td>
			<c:if test="${account.locked }">
				x
			</c:if>
		</td>

	</tr>
</c:forEach>
</table>